package com.jpro.module.system.controller.admin.membergroup.vo;

import com.jpro.module.system.controller.admin.permission.vo.permission.SiteChannelVO;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Set;

/**
 * 会员组 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class MemberGroupBaseVO {

    @Schema(description = "会员组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @DiffLogField(name = "会员组名称")
    @NotNull(message = "会员组名称不能为空")
    private String name;

    @Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    @DiffLogField(name = "显示顺序")
    @NotNull(message = "显示顺序不能为空")
    private Integer sort;

    @Schema(description = "文档数据范围（1：全部数据权限 2：自定数据权限）")
    @DiffLogField(name = "文档数据范围")
    private Integer docDataScope;

    @Schema(description = "文档类栏目数据权限范围", requiredMode = Schema.RequiredMode.REQUIRED, example = "参见 DataScopeEnum 枚举类")
    private Set<SiteChannelVO> dataScopeDocChannelIds;

    @Schema(description = "类型（1系统组 2常规组）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @DiffLogField(name = "类型")
    @NotNull(message = "类型（1系统组 2常规组）不能为空")
    private Integer type;

    @Schema(description = "备注", example = "你说的对")
    @DiffLogField(name = "备注")
    private String remark;

    @Schema(description = "文档类栏目数据权限范围")
    private Set<Long> scopeDocChannelIdList;


}
